Skip to content

Comments

[MNT] Replace live server calls with mocks in test_regression_task.py#1682

Open
Jay2006sawant wants to merge 1 commit intoopenml:mainfrom
Jay2006sawant:mnt/mock-test-regression-task
Open

[MNT] Replace live server calls with mocks in test_regression_task.py#1682
Jay2006sawant wants to merge 1 commit intoopenml:mainfrom
Jay2006sawant:mnt/mock-test-regression-task

Conversation

@Jay2006sawant
Copy link

Metadata

Details

This PR replaces live test-server calls with local mocks in tests/test_tasks/test_regression_task.py as part of #1649.

Changes:

  • setUp — removed check_task_existence / create_task / publish server calls, replaced with direct attribute assignment
  • test_get_X_and_Y — mocks get_task to return a task with mock data, removed @pytest.mark.test_server()
  • test_download_task — mocks get_task to return a locally constructed OpenMLRegressionTask, removed @pytest.mark.test_server()
  • Cleaned up unused imports (ast, OpenMLServerException, check_task_existence)

Both tests now run fully offline without hitting any server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MNT] Replace Live Server Calls with Mocks in Unit Tests

1 participant